home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 21 / Cream of the Crop 21 (Terry Blount) (October 1996).iso / editor / auror300.zip / PARAGRPH.AML < prev    next >
Text File  |  1996-07-17  |  1KB  |  57 lines

  1. //--------------------------------------------------------------------
  2. // PARAGRPH.AML
  3. // Find Next/Prev Paragraph, (C) 1993-1996 by nuText Systems
  4. //
  5. // The Paragrph macro defines keys to move the cursor to the next
  6. // paragraph, previous paragraph, and end of the current paragraph.
  7. // Paragraphs are assumed to be separated by one or more blank lines.
  8. //
  9. // Usage:
  10. //
  11. // Select this macro from the Macro List (on the Macro menu), or run it
  12. // from the macro picklist <shift f12>.
  13. //--------------------------------------------------------------------
  14.  
  15. include bootpath "define.aml"
  16.  
  17. // edit windows only
  18. object edit
  19.  
  20. // next paragraph
  21. key <alt down>
  22.   while getlinelen and down do end
  23.   while not getlinelen and down do end
  24.   col (getlinebeg)
  25. end
  26.  
  27. // prev paragraph
  28. key <alt up>
  29.   up
  30.   while not getlinelen and up do end
  31.   if getlinelen then
  32.     while getlinelen and up do end
  33.     if not getlinelen then
  34.       down
  35.     end
  36.   end
  37.   col (getlinebeg)
  38. end
  39.  
  40. // to end-of-paragraph
  41. key <alt right>
  42.   while not getlinelen and down do end
  43.   if getlinelen then
  44.     while getlinelen and down do end
  45.     if not getlinelen then
  46.       up
  47.     end
  48.   end
  49.   col getlinelen + 1
  50. end
  51.  
  52. resident ON
  53.  
  54. //helpmacro (arg 1)
  55. display
  56. say "Paragrph installed"
  57.